﻿namespace NGen.Managers.GUI
{
	/// <summary>
	/// 	Interface to the GUI manager
	/// </summary>
	public interface IManagerGUI : IGameManager
	{
		/// <summary>
		/// 	Get or set the ability for buttons to maintain focus when clicked.
		/// 	If a button has focus, pressing space will activate the button.
		/// 	This is set to false by default.
		/// </summary>
		bool AllowButtonsToKeepFocus { get; set; }

		/// <summary>
		/// 	Reload the GUI, useful if any changes were made within individual elements
		/// </summary>
		void RefreshGUI();

		/// <summary>
		/// 	Add an element to the GUI, if it is not already added
		/// </summary>
		/// <param name = "p_element">element to add</param>
		void AddElement(GUIElement p_element);

		/// <summary>
		/// 	Remove an element from the GUI
		/// </summary>
		/// <param name = "p_element">element to remove</param>
		void RemoveElement(GUIElement p_element);

		/// <summary>
		/// 	Clears the GUI, cleaning up all added objects
		/// </summary>
		void ClearGUI();

		/// <summary>
		/// 	Returns an array containing all of the GUIElements which are
		/// 	currently loaded
		/// </summary>
		/// <returns>an array of all loaded GUIElements</returns>
		GUIElement[] GetElementsList();

		/// <summary>
		/// 	Returns a string array containing all of the currently visible
		/// 	layouts
		/// </summary>
		/// <returns>the list of element names</returns>
		string[] GetElementsNames();

		/// <summary>
		/// 	Notify the GUI of a screen resolution change
		/// </summary>
		void ScreenResolutionChanged();

		/// <summary>
		/// 	Check if the mouse cursor is over a GUI element
		/// </summary>
		/// <returns>true if the mouse is over a GUI element</returns>
		bool MouseOverGUI();
	}
}